#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
	int a = 0;
	scanf("%d", &a);
	int c = 0;
	while (a)
	{
		c += a & 1;
		a >>= 1;
	}
	printf("%d", c);
	return 0;
}